package com.structure.adapter;

public class Mp3Player implements IMediaPlayer{

	private IMediaPlayer adapter;

	public Mp3Player(){
	}

	public Mp3Player(IMediaPlayer adapter){
		this.adapter = adapter;
	}

	public void playMp3(String name){
		if (this.adapter == null)
			System.out.println("播放音频文件：" + name);
		else
			this.adapter.playMp3(name);
	}
}